def jc(n):
    if n==1:
        resturn = 1
    else:
        resturn = n*jc(n-1)
    return resturn
def main():
    num = int(input("输入非负整数："))
    print("{}!={}".format(num,jc(num)))
if __name__ == '__main__':
    main()
    """
    这个递归用的不错
    """